package org.smart4j.framework.dwtest;

import com.sun.media.sound.SoftTuning;
import org.smart4j.framework.dwtest.simplproxy.CglibProxy;

/**
 * Created by
 *
 * @author dw
 * @date 2018/01/26
 */
public class StringSB {
    public static void main(String[] args) {
        String a = "abc123你好";

        long begin1 = System.currentTimeMillis();
        StringBuilder sb1 = new StringBuilder(a);
        String b = sb1.reverse().toString();
        System.out.println(b);
        long end1 = System.currentTimeMillis();
        System.out.println(end1 - begin1);

        long begin2 = System.currentTimeMillis();
        StringBuffer sb2 = new StringBuffer(a);
        String c = sb2.reverse().toString();
        System.out.println(c);
        long end2 = System.currentTimeMillis();
        System.out.println(end2 - begin2);

        String aa = new String();
        try {
            //通过反射创建对象
            Class<?> cc = Class.forName("java.lang.String");
            String ee = (String) cc.newInstance();

        } catch (Exception e) {
            e.printStackTrace();
        }


    }
}
